<?php
  require_once('system/dbConnect.php');
  require_once('system/myFunc.php');
  //连接数据库   
  connect();
  if(!empty($_FILES["wn_pic"]["name"])){
    $wn_pic = uploadfile('wn_pic','upload/',array('jpg','gif','png'));
  }
  else{
    $wn_pic='';
  }
 $data = array(
    'wn_title' => trim($_POST['wn_title']),  
    //'wn_pic' => $wn_pic,  
    'wn_pic' => $_POST['wn_pic'],
    'wn_place' => $_POST['wn_place'],
    'wn_intro' => $_POST['wn_intro'],
    'wn_adddate' => $_POST['wn_adddate'],
    'wn_hint' => $_POST['wn_hint'],
    );
  $result = add('flower',$data); 
  if(!$result)
  {
    echo "添加失败！<br/>";
    echo "<a href='addflower.php'>返回</a>";    
  }
  else
  {   
   
   redirect('flowerlist.php','添加成功！'); 
  }    
  
?>
  






















 















